# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Antonio Rojas <arojas@archlinux.org>

pkgname=polkit-kde-agent
pkgver=5.10.95
pkgrel=1
pkgdesc='Daemon providing a polkit authentication UI for KDE'
arch=('i686' 'x86_64')
url='https://www.kde.org/workspaces/plasmadesktop/'
license=('LGPL')
depends=('kiconthemes' 'kdbusaddons' 'kcrash')
makedepends=('extra-cmake-modules' 'kdoctools' 'python')
conflicts=('polkit-kde-frameworks')
replaces=('polkit-kde-frameworks')
groups=(plasma)
source=("https://download.kde.org/unstable/plasma/$pkgver/$pkgname-1-$pkgver.tar.xz"{,.sig})
sha256sums=('2558d8402675bfc482b336bbafe1aa033dbcecf37dc811d78bb040c629185c29'
            'SKIP')
validpgpkeys=('2D1D5B0588357787DE9EE225EC94D18F7F05997E'  # Jonathan Riddell
              '348C8651206633FD983A8FC4DEACEA00075E1D76'  # KDE Neon
              'D07BD8662C56CB291B316EB2F5675605C74E02CF') # David Edmundson

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-1-$pkgver \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DKDE_INSTALL_LIBDIR=lib \
    -DKDE_INSTALL_LIBEXECDIR=lib/polkit-kde \
    -DBUILD_TESTING=OFF
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
